import { request} from "../request/index";

export const getCartInfo = (params) =>{
  return  request({
    url: "/cart/"+params,
    method:"get",
  })
}

export const setCartInfo = (userid,id,put) =>{
  return request({
    url: "/cart/"+userid+"/",
    method:"PUT",
   data:{
       cart_id:id,
       put:put
   }
  });
}

export const deleteCartOne = (userid,id) =>{
  return request({
    url: "/cart/"+userid+"/",
    method:"delete",
   data:{
       cart_id:id,
   }
});
}

export const creatCartOne = (userid,goods_id) =>{
  return request({
    url: "/cart/",
    method:"post",
    data:{
       userid:userid,
       goods_id:goods_id,
       number:1,
       is_check:"true"
    }
});
}



